<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,800,700,600,400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Playfair+Display:400,700,900,400italic,700italic,900italic' rel='stylesheet' type='text/css'>

<?php
get_header();
$layout = ThemexCore::getOption('blog_layout', 'right');
$date_format = get_option('date_format');

if (get_the_ID() == 35) {
    ?>
    <div class = "fullwidth-block">
        <!--***************************************************-->
        <div id = "fila_paginas_home">
            <!--Paginas-->
            <?php
            if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Home Paginas'))
                ;
            ?>
        </div>
        <br></br>
        <!--    ***************************************************-->
        <div id="fila_planes_home">
            <!-- Planes -->
            <?php
            if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Home Planes'))
                ;
            ?>
        </div>
        <br></br>
        <!--    ***************************************************-->
	        <div id="fila_miscelanea_home">
	            <!--    ***************************************************-->
	            <div class="threecol column">
	                <!-- Description -->
	                <?php
	                $args = array(
	                    'post_type' => 'testimonial',
	                    'posts_per_page' => 1,
	                    'orderby' => 'rand'
	                );
	                $my_query = new WP_Query("page_id=2359");
	                if ($my_query->have_posts()) {
	                    while ($my_query->have_posts()) {
	                        $my_query->the_post();
	                        ?> 
	                        <h1 id="TitleTestimonial"><?php the_title(); ?></h1>
	                        <div class="fourcol column">
	                            <a class="ImagenTestimonials" rel="external" href="<? the_permalink() ?>">
	                                <div id="idImagenTestimonials"><?php the_post_thumbnail(array(80, 80)); ?></div></a>
	                        </div >
	                        <span id="contenido1"><?php echo the_excerpt_max_charlength(180); ?>
	                            <a href="<?php the_permalink(); ?>" id="idReadMore">Read more »</a>
	                        </span>
	                        <?php
	                    }
	                }
	                wp_reset_postdata();
	                ?>
	            </div>

	            <div class="threecol column">
	                <h1 id="TitleTweets">Latest Tweets</h1>
	                <?php
	                if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Home Tweets'))
	                    ;
	                ?>
	            </div>

	            <div class="threecol column columna_unica">
	                <div class="titlePrefoterTerceraColumn">Latest news & resources</div><br>
	                <?php
	                $args = array(
	                    'cat' => l,
	                    'posts_per_page' => 1,
	                    'orderby' => 'date',
	                    'order' => 'ASC'
	                );
	                $my_query = new WP_Query($args);
	                if ($my_query->have_posts()) {
	                    while ($my_query->have_posts()) {
	                        $my_query->the_post();
	                        ?> 
	                        <div id="contenedor">
	                            <div id="lateral">
	                                <a class="ImagenNewsyResources" rel="external" href="<? the_permalink() ?>" >
	                                    <div id="imagenNewsyResources"><?php the_post_thumbnail('medium'); ?></div></a>
	                            </div>
	                            <div id="principal">
	                                <h1 id="TitleNewsyResources"><?php the_title(); ?></h1>
	                                <span id="contenido1"><?php echo the_excerpt_max_charlength(120); ?>
	                                    <br></br>

	                                    <div class="enlace_readmore"><a id="idfecha" ><?php the_time('F j, Y')?></a>&nbsp<a id="idComentarios"><?php comments_number('0', '1', '% comments'); ?></a>
	                                        <a href="<?php the_permalink(); ?>" class="enlace_readmore">Read more »</a>
	                                    </div>    
	                                </span>
	                            </div>
	                        </div>
	                        <?php
	                    }
	                }
	                wp_reset_postdata();
	                ?>
	            </div>
	        </div>    
    </div>                
	<?php
}else if(get_cat_ID('News & Resources') == 0){	
    if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('News&Resources'));
    }
get_footer();
?>